package com.pinda.controller;


import com.github.pagehelper.PageInfo;
import com.pinda.commonutils.Page;
import com.pinda.service.IPdTaskTransportService;
import com.pinda.work.vo.ExeceptiontaskView;
import com.pinda.work.vo.InstitutionaldataKanbanboardView;
import com.pinda.work.vo.pdtasktransportQueryView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 运输任务表 前端控制器
 * </p>
 *
 * @author 黄杰
 * @since 2023-06-13
 */
@RestController
@RequestMapping("/pd-task-transport")
public class PdTaskTransportController {


    @Autowired
    private IPdTaskTransportService taskTransportService;

    /**
     * 分页查询运输任务管理分页查询
     * @param page
     * @return
     */
    @PostMapping("/querypageInfoalltasktansport")
    public PageInfo<pdtasktransportQueryView> querypageInfoalltasktansport(@RequestBody Page<pdtasktransportQueryView> page){
        return this.taskTransportService.querypageInfoalltasktansportService(page);
    }

    @GetMapping("/querynstitutionaldataKanbanboard")
    public InstitutionaldataKanbanboardView querynstitutionaldataKanbanboardController(){
        return this.taskTransportService.querynstitutionaldataKanbanboardService();
    }




    /**
     * -- 最新四条异常的数据
     */
    @GetMapping("/queryExceptionTaskController")
    public List<ExeceptiontaskView> queryExceptionTaskController(){
        return this.taskTransportService.queryExceptionTaskService();
    }

    /**
     * 最新到达的表 查询30分钟内到达的运输任务表
     */
    @GetMapping("/queryrealtimecontroller")
    public List<ExeceptiontaskView> queryRealTimeController(){
        return this.taskTransportService.queryRealtimeService();
    }

}
